Skip to content

Conversation

@Pranay096
Copy link
Contributor

@Pranay096 Pranay096 commented Nov 26, 2025

Contributes to #3743

Changes made in this Pull Request:

  • Modernized assertions in testsuite/MDAnalysisTests/analysis/test_distances.py
  • Replaced deprecated assert_almost_equal / assert_array_almost_equal with numpy.testing.assert_allclose and assert_array_equal where appropriate
  • Replaced old float comparison patterns with modern NumPy/PyTest assertions
  • Ensured no behavioural changes to distance calculations

PR Checklist

  • Issue raised/referenced? (Contributes to modernize testing code #3743)
  • Tests updated/added? (Updated test assertions)
  • Documentation updated/added?
  • package/CHANGELOG file updated?
  • Is your name in package/AUTHORS?

Developers Certificate of Origin

I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.


📚 Documentation preview 📚: https://mdanalysis--5158.org.readthedocs.build/en/5158/

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.71%. Comparing base (6b51eac) to head (b329d19).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5158      +/-   ##
===========================================
- Coverage    92.72%   92.71%   -0.02%     
===========================================
  Files          180      180              
  Lines        22458    22457       -1     
  Branches      3186     3186              
===========================================
- Hits         20824    20820       -4     
- Misses        1177     1179       +2     
- Partials       457      458       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Pranay096
Copy link
Contributor Author

This PR is ready for review.

All tests pass locally, and the only CI failure was a cancelled job due to duplicate workflow runs by GitHub.

@orbeckst @RMeli @marinegor — Please let me know if anything else is needed. Thanks!

Copy link
Contributor

@marinegor marinegor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pranay096 thanks for the PR, this one is also accepted.

If you're planning to work on them file by file, I'd be in favor of choosing some strategy to chunk them together, since there are 70 files that need modernization, and 860 occurrences total. I'd think about splitting them logically (i.e. by module or finer) into ~10-ish PRs, because 70 PRs would be quite overwhelming in terms of review time (but perhaps it's just me -- @MDAnalysis/coredevs ?)

@marinegor marinegor merged commit 70aae14 into MDAnalysis:develop Nov 27, 2025
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants